<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>编辑明细配送</title>
	<link rel="stylesheet" href="css/reset.css">
	<link rel="stylesheet" href="css/product.css">
	<link rel="stylesheet" href="css/select-big.css">
	<style>
		.content-btn {
		    margin: 0 16px;
		}
		.product-child-content{
			width: 750px;
			margin: 0 auto;
		}
		.product-child-content .content-btn {
		    margin: 0;
		}
		.content-table-two tbody tr td input{
			width: 80%;
			height: 30px;
			line-height: 30px;
			background: #F9FBFF;
			border: 1px solid #ecf2f7;
			border-radius: 15px;
			text-align: center;
		}
		.icon-delImg{
			display: inline-block;
		    background: url(images/close-1.png)no-repeat;
		    width: 25px;
		    height: 25px;
		    cursor: pointer;
		}
		.icon-delImg:hover{
			background: url(images/close-1.png)no-repeat 0 -27px;
		}
		.divLeft {
		    float: right;
		    width: auto;
		    display: inline-block;
		    margin-top: -35px;
		}
		.content-table-newservice {
		    width: 88%;
		    margin: 10px auto;
		}
		.content-table-newservice tbody tr td:nth-child(odd){
			width: 100px;
		}
		.content-table-newservice tbody tr td{
			border-bottom:1px solid #f5f5f5;
		}
		.content-table-newservice tbody tr:last-child td{
			border-bottom:0px solid #f5f5f5;
		}
		.content-table-newservice tbody tr td p{
			display: inline-block;
		    width: 640px;
		    min-height: 30px;
		    margin-top: 15px;
		    word-wrap: break-word;
		    line-height: 20px;
		}
	</style>
</head>
<body style="background:#fff;">
<div class="main-content-box">
	<div stype = "display:none;" id = "init">
		<form id = "seachContractInboundForm">
			<input type = "hidden" name = "expressInbound.expressid">
		</form>
	</div>
	<div class="content-list">
		<table class="content-table-newservice" cellspacing="0" cellpadding="0">
			<tbody>
				<tr>
					<td><span>快递公司：</span></td>
					<td id = "company"></td>
					<td><span>快递单号：</span></td>
					<td id = "tracknumber"></td>
				</tr>
				<tr>
					<td>描述：</td>
					<td colspan="3"><p id = "remark"></p></td>
				</tr>
			</tbody>
		</table>
	</div>
	<!-- <button class="save-btn matop" id = "confirm">确认</button> -->
	<div class="product-child-content">
		<div class="content-info">
			<div class="content-btn bot-line">
				<span class="title-info">纸质合同信息</span>
			</div>
			<div class="divLeft">发送数量：<span id = "number"></span></div>
			<table class="tableOrder content-table-two matop"  bindForm = "seachContractInboundForm" datatable = "true" cellspacing="0" cellpadding="0" dataAction = "/contractInbound/findList">
				<tbody style = "display:none;">
					<th style="width:100px;" title = "项目编码" name = "projectcode" type = "string"></th>
					<th style="width:250px;" title = "项目名称" name = "projectname" type = "string"></th>
					<th style="width:100px;" title = "需配送" name = "nd" type = "string"></th>
					<th style="width:100px;" title = "可配送" name = "canDispatchnumber" type = "string"></th>
					<th style="width:100px;" title = "本次配送数" name = "expressInbound.number" type = "string"></th>
					<th style="width:100px;" title = "合同编号" name = "expressInbound.contractnumber" type = "string"></th>
				</tbody>
			</table>
			<!-- <button class="save-btn matop">确认</button> -->
		</div>
	</div>
	<button class="save-btn matop" id = "confirm" style="margin-left: 75px;">确认</button>
</div>
	<script src="js/jquery-3.2.1.min.js"></script>
	<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
	<script src="js/select.jquery.js"></script>
	<script type="text/javascript" src = "js/util.js"></script>
	<script type="text/javascript" src = "js/allProduct.js"></script>
	<script>
		$(document).ready(function(){
			var data = parent.data;
			$("#init").find("input[name='expressInbound.expressid']").val(data.id);
			$("#company").text(data.company);
			$("#tracknumber").text(data.tracknumber);
			$("#remark").text(data.remark);
			$("#number").text(data.sends);
			console.log(data);
			$("#confirm").click(function(){
				var param = new FormData();
				param.append("id",data.id);
				$.ajax({
			        type: 'post',
			        url:baseUrl + "/expressInformation/trackSign",
			        contentType: false,  
			        processData: false, 
			        async: false,
			        data:param
				}).done(function(dt){
					if(dt == 0){
						parent.layer.msg("签收失败!");
					}else{
						parent.layer.closeAll();
						parent.layer.msg("签收成功!");
					}
				});
			});
		});
		function tableCallBack (my){
        	$(my).next().remove();
        }
        function getHeight(){
            var myiframeH=$(".main-content").height();
            var _parent=$(window.parent.document);
            _parent.find('body').css('height',(myiframeH+150)+'px');
            _parent.find('.main-position').css('height',(myiframeH+100)+'px');
        };
        $('.main-content').resize(function(){
            getHeight();
        });
	</script>
	<script type="text/javascript" src = "js/table.js"></script>
</body>
</html>